package com.ruoyi.qbms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qbms.mapper.QbmsTagMapper;
import com.ruoyi.qbms.domain.QbmsTag;
import com.ruoyi.qbms.service.IQbmsTagService;

/**
 * 题库标签Service业务层处理
 * 
 * @author zouhuu
 * @date 2022-10-16
 */
@Service
public class QbmsTagServiceImpl implements IQbmsTagService 
{
    @Autowired
    private QbmsTagMapper qbmsTagMapper;

    /**
     * 查询题库标签
     * 
     * @param id 题库标签主键
     * @return 题库标签
     */
    @Override
    public QbmsTag selectQbmsTagById(Long id)
    {
        return qbmsTagMapper.selectQbmsTagById(id);
    }

    /**
     * 查询题库标签列表
     * 
     * @param qbmsTag 题库标签
     * @return 题库标签
     */
    @Override
    public List<QbmsTag> selectQbmsTagList(QbmsTag qbmsTag)
    {
        return qbmsTagMapper.selectQbmsTagList(qbmsTag);
    }

    /**
     * 新增题库标签
     * 
     * @param qbmsTag 题库标签
     * @return 结果
     */
    @Override
    public int insertQbmsTag(QbmsTag qbmsTag)
    {
        qbmsTag.setCreateTime(DateUtils.getNowDate());
        return qbmsTagMapper.insertQbmsTag(qbmsTag);
    }

    /**
     * 修改题库标签
     * 
     * @param qbmsTag 题库标签
     * @return 结果
     */
    @Override
    public int updateQbmsTag(QbmsTag qbmsTag)
    {
        qbmsTag.setUpdateTime(DateUtils.getNowDate());
        return qbmsTagMapper.updateQbmsTag(qbmsTag);
    }

    /**
     * 批量删除题库标签
     * 
     * @param ids 需要删除的题库标签主键
     * @return 结果
     */
    @Override
    public int deleteQbmsTagByIds(Long[] ids)
    {
        return qbmsTagMapper.deleteQbmsTagByIds(ids);
    }

    /**
     * 删除题库标签信息
     * 
     * @param id 题库标签主键
     * @return 结果
     */
    @Override
    public int deleteQbmsTagById(Long id)
    {
        return qbmsTagMapper.deleteQbmsTagById(id);
    }
}
